<template>
  <a-card>
    <span class="params_list_title">参数集</span>
    <a-table
      :data="equipmentStore.paramsConfList"
      :columns="paramsListColumns"
      size="small"
      :bordered="{ cell: true }"
      :pagination="false"
      @cell-dblclick="equipmentStore.paramsConfListDbclick"
    >
      <template #cz="{ rowIndex }">
        <a-button size="mini" type="primary" shape="circle">
          <icon-edit />
        </a-button>
        <a-button size="mini" type="primary" style="margin-left: 6px" status="danger" shape="circle">
          <icon-delete />
        </a-button>
      </template>
    </a-table>
  </a-card>
</template>

<script lang="ts">
import { defineComponent, ref, onMounted } from 'vue'
export default defineComponent({
  name: 'paramsListCard'
})
</script>
<script lang="ts" setup>
// 引入
import { useEquipmentStore } from '@/store'
const equipmentStore = useEquipmentStore()

// 参数集的表格字段规则
const paramsListColumns = ref([
  {
    title: '功能码',
    dataIndex: 'funCode',
    slotName: 'funCode',
    align: 'center'
  },
  {
    title: '485地址',
    dataIndex: 'addressCode',
    slotName: 'addressCode',
    align: 'center'
  }
  // {
  //   title: '操作',
  //   dataIndex: 'cz',
  //   slotName: 'cz',
  //   align: 'center'
  // }
])
</script>

<style lang="scss" scoped>
.params_list_title {
  display: inline-block;
  line-height: 35px;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}
</style>